﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LightLog.Model.DTO;
using LightLog.Model.Input;

namespace LightLog.IService
{
    public interface IUserService : IBaseService
    {
        /// <summary>
        /// 获取用户信息
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<List<UserDTO>> GetListAsync(UserListInput input);

        /// <summary>
        /// 获取用户信息
        /// </summary>
        /// <param name="userid"></param>
        /// <returns></returns>
        Task<UserDTO> GetUserAsync(long userid);

        /// <summary>
        /// 判断是否为管理员
        /// </summary>
        /// <param name="userid"></param>
        /// <returns></returns>
        Task<bool> GetIsAdminAsync(long userid);

        /// <summary>
        /// 创建用户
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<(long,string)> CreateUserAsync(UserInput input);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<string> UpdateUserAsync(UserUpdateInput input);

        /// <summary>
        /// 创建用户和项目关联
        /// </summary>
        /// <param name="list"></param>
        /// <returns></returns>
        Task<bool> SetUserProjectAsync(List<UserProjectDTO> list,long userId);

        /// <summary>
        /// 删除用户和项目关联
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<bool> DeleteUserProjectByUseridAsync(long userId);

        /// <summary>
        /// 更改密码
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<bool> ChangePwdAsync(UserChangeInput input);

        long GetUserIDByToken();
    }
}
